x11: don't add unknown tools to our list
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 14 Dec 2018 04:57:26 +0000 (14:57 +1000)
committerCarlos Garnacho <carlosg@gnome.org>
Tue, 18 Dec 2018 20:41:09 +0000 (21:41 +0100)
commite95e0458988821ce4d8915c243fa79398515ed27
tree9fe6517405edf43521e18b65e3cae7fbe57bddb1
parent1b730dcf316ddb51d6a800e09f3e91df15c8d533
x11: don't add unknown tools to our list

Generic tools (Bamboo, built-in tablets) always have the same serial number
assigned by the wacom driver. This includes the touch tool when the wacom
driver handles the touch evdev node (common where users require the wacom
gestures to work).

When the first device is the touch device, a tool is created with that serial.
All future tools now return the touch tool on lookup since they all share the
same serial number. Worse, this happens *across* devices, so the pen
event node gets assigned the touch tool because they all have the same serial.

Since we don't actually care about the touch as a tool, let's skip any unknown
tool. This captures pads as well.
gdk/x11/gdkdevicemanager-xi2.c